package lec02.am;

public class FunDemo2 {
	static void f(int x) {
		x++;

	}

	static void f(int[] x)	{
		System.out.println("Infuc f:" + x.hashCode());
		x[0]++;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// testFVal();
		testFRef();

	}

	private static void testFRef() {
		int x[] = { 1, 2, 3, 4, 5 };
		System.out.println("Infuc testFRef:" + x.hashCode());
		f(x);
		System.out.println(x[0]);

	}

	private static void testFVal() {
		int x = 3;
		f(x);
		System.out.println(x);
	}

}
